package cn.zpfhomework05;

public class Benchi extends Car {
    //价格、型号；具有功能：变速；
    private String price;
    private String model;

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }
    public void changespeed(int a)
    {
        if(a>0)
        {
            System.out.println("加速");
        }
        else if(a<0)
        {
            System.out.println("减速");
        }
        else
        {
            System.out.println("匀速前进");
        }

    }
}